<?php
/**
 * Page.php
 * Created by PhpStorm.
 * User: 江小波
 * Date: 2019/3/7
 * Time: 11:17
 */
namespace webapp\lib;

use webapp\lib\page\Display;

abstract class Page implements Display {
    protected $config  = [];
    public function __construct($options = []){
        $this->config   =   array_merge($this->config, $options);
    }
    public function __get($name) {
        return $this->config[$name];
    }
    public function __set($name,$value){
        if(isset($this->config[$name])) {
            $this->config[$name] = $value;
        }
    }

    public static function getNewCaller(){
        return new static();
    }
}